<template>
  <AppTopnav></AppTopnav>
  <AppHeader></AppHeader>
  <AppHeaderSticky></AppHeaderSticky>
  <div>
    <!-- 二级路由出口 -->
    <router-view></router-view>
  </div>
  <AppFooter></AppFooter>
</template>

<script>
import AppTopnav from './components/app-topnav.vue'
import AppHeader from './components/app-header.vue'
import AppFooter from './components/app-footer.vue'
import AppHeaderSticky from './components/app-header-sticky.vue'
import { useStore } from 'vuex'
export default {
  components: { AppTopnav, AppHeader, AppHeaderSticky, AppFooter },
  name: 'XtxLayout',
  // 调用执行Vuex的异步函数
  setup () {
    const store = useStore()
    store.dispatch('category/getList')
  }
}
</script>

<style scoped lang='less'>

</style>
